# 通过直接搜索来定位出所需内容所处的数据包
import requests

# 定义请求网址
url = 'https://movie.douban.com/j/chart/top_list?type=24&interval_id=100%3A90&action=&start=0&limit=20'

# 定义请求头
headers = {
    "user-agent": "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/135.0.0.0 Safari/537.36"
}

# 发起网络请求，并保存
response = requests.get(url, headers=headers)
with open('douban.text', 'w', encoding='utf-8') as f:
    f.write(response.text)
